<?php
include("controller.php");
include(MODELDIR."category.php");
class CategoryController extends Controller 
{
	private $cate;
	public function init()
	{
		$this->cate=new Category();
		$this->view->cates=$this->cate->getAllCategory();
	}
	public function indexAction()
	{
		$cate_id=$_GET["cate"];
		$cate=new Category();
		$cate->findById($cate_id);
		$this->setLayout("category");
		$this->display();
	}
}